![]() ![]() ![]() ![]() ![]() |
Troubleshooting and Configuring the Windows NT/95 Registry
-12-How the Registry Controls HardwareIn Windows NT and Windows 95, 32-bit functions never access hardware directly. In every case, there is a driver or API (application programming interface) that actually communicates with the hardware. Microsoft provides the APIs, or hooks, to make the process easier for the software vendor, and distributes the technical information through the Software Developer's Kit (SDK). With that information, the programmer need only connect to the hook, and Microsoft will do the rest. NT or 95 will then make the procedure call, utilize the system resources, and communicate with the hardware device. In DOS and 16-bit operating systems, programmers could bypass the operating system and write information directly to the hardware. The hardware would have to be very specific, and different routines would have to be written for each type of hardware. Windows 95 allows both types of hardware access and control. Programmers can choose
which type of function they will use. Windows NT does not allow any direct hardware
access because any access may open the door for security challenges and instability.
In Windows NT, every The downside of the NT approach is the problem that Windows NT has with some Windows 95 and DOS applications. Certain applications, like fax and backup applications, try to work directly with the hardware in the system. There are a great number of 95 applications that use fax cards and tape drives, and a very small number for Windows NT. Those written for 95 will not work at all in NT. The Role of the RegistryIn order for all the communication to happen between the hardware and the OS,
the Registry needs to provide the information to the operating system. The Registry
holds, at a minimum, basic settings that allow communication. Some of those settings
are described in Table 12.1.
In most cases, the hardware settings are the same on the physical device as they are in the Registry. With Windows 95, if there is a difference, or if there is a conflict between what is set and what the system needs to use to ensure coexistence, Windows 95 will change the Registry setting through Plug and Play. Figure 12.1 illustrates the startup and setting resolution process in Windows 95. Figure 12.1. Windows 95 hardware settings resolution process.
The Registry plays a key role in making all the devices work. If the Registry is corrupted, and the settings are not available, the device will not work. Figure 12.2. Windows NT hardware settings resolution process.
Hardware Registry Settings in Windows NTAll the settings and controls for hardware for Windows NT are in HKEY_LOCAL_MACHINE. There are several subkeys that hold the information required by Windows NT for operations.
Figure 12.3 shows a cascading view of HKEY_LOCAL_MACHINE with DESCRIPTION, DEVICEMAP, and RESOURCEMAP open. These three subkeys hold the settings and control information for the hardware. DESCRIPTION supplies data to NT about the system board, the processors, and the bus. DEVICEMAP either directly holds data and settings about the devices connected to the bus or supplies a description and location of a driver. RESOURCEMAP holds settings for many of the drivers for the devices. Seldom would you ever make settings here. Instead, you would make all the settings in Control Panel, and then Control Panel would store them in these keys for use by Windows NT, and for viewing by Windows NT Diagnostics. Figure 12.3. HKEY_LOCAL_MACHINE in the NT Registry controls all hardware.
Hardware Registry Settings in Windows 95All the settings and controls for hardware in Windows 95 are in HKEY_LOCAL_MACHINE.
The Enum key holds information on every BIOS-supported device that is used
in the system, as shown in Figure 12.4.
When Plug and Play sets the configuration, it is stored in HKEY_DYN_DATA and then copied to HKEY_LOCAL_MACHINE as a backup. In HKEY_LOCAL_MACHINE, the configuration information is held in HKEY_LOCAL_MACHINE\Enum\Root for most devices. Figure 12.5 shows the binary Settings value, indicating that it has been set through Plug and Play. Figure 12.5. Binary Settings information for COM3.
Figure 12.6. Binary ForcedConfig information for the Adaptec 1542C SCSI Host Adapter.
Figure 12.7. Binary BootConfig information for the SoundBlaster Sound Card.
SummaryWith all the settings and configuration information in the Registry, hardware in Windows 95 and NT can be controlled easily. The Registry also contains the location of each of the drivers used for control, and any information specific to the use of the hardware by the operating system. |
||||||||||
|